import os
import random

sizes = [4, 8, 16, 32, 64, 128, 188]  # 单位MB
num_files = 4
folder = '../senddata'
os.makedirs(folder, exist_ok=True)

def gen_bin_file(path, size_mb):
    with open(path, 'wb') as f:
        f.write(os.urandom(size_mb * 1024 * 1024))

for size in sizes:
    for i in range(1, num_files + 1):
        filename = f"{size}M_{i}.bin"
        path = os.path.join(folder, filename)
        print(f"Generating {path} ...")
        gen_bin_file(path, size)
print("All files generated.") 